package com.znsd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Liuyl
 * @since 2019-10-16
 */
@TableName("order_detail")
public class OrderDetail extends Model<OrderDetail> {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 订单编号
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * sku_id
     */
    @TableField("sku_id")
    private Long skuId;
    /**
     * sku名称（冗余)
     */
    @TableField("sku_name")
    private String skuName;
    /**
     * 图片名称（冗余)
     */
    @TableField("img_file_name")
    private String imgFileName;
    /**
     * 购买价格(下单时sku价格）
     */
    @TableField("order_price")
    private BigDecimal orderPrice;
    /**
     * 购买个数
     */
    @TableField("sku_nums")
    private String skuNums;
    /**
     * 物流包裹id
     */
    @TableField("logistics_id")
    private Long logisticsId;
    @TableField("img_url")
    private String imgUrl;
    @TableField("sku_num")
    private String skuNum;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getImgFileName() {
        return imgFileName;
    }

    public void setImgFileName(String imgFileName) {
        this.imgFileName = imgFileName;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public String getSkuNums() {
        return skuNums;
    }

    public void setSkuNums(String skuNums) {
        this.skuNums = skuNums;
    }

    public Long getLogisticsId() {
        return logisticsId;
    }

    public void setLogisticsId(Long logisticsId) {
        this.logisticsId = logisticsId;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getSkuNum() {
        return skuNum;
    }

    public void setSkuNum(String skuNum) {
        this.skuNum = skuNum;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "OrderDetail{" +
        "id=" + id +
        ", orderId=" + orderId +
        ", skuId=" + skuId +
        ", skuName=" + skuName +
        ", imgFileName=" + imgFileName +
        ", orderPrice=" + orderPrice +
        ", skuNums=" + skuNums +
        ", logisticsId=" + logisticsId +
        ", imgUrl=" + imgUrl +
        ", skuNum=" + skuNum +
        "}";
    }
}
